package 招聘.京东;

import java.util.Scanner;
import java.util.Vector;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        Vector<Integer> H = new Vector<>();
        for (int i = 0; i < N; i++) {
            H.add(s.nextInt());
        }
        int answer=0;
        for (int i = 0; i < N; ) {
            if(H.get(i)>H.get(i+1)){
                for(int j=i+1;j<N;j++) {
                    if(H.get(i)<H.get(j)) {
                        answer++;
                        i=j;
                        break;
                    }
                    else if(j==N-1){
                        answer++;
                        i=N;
                        break;
                    }
                }
            }
            else  {
                i++;
                answer++;
            }
        }
        System.out.println(answer);
    }
}
